﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace TakePhotoTogether.Communication.Protocols
{
    public class BackgroundStreamData : PayloadData
    {
        private bool active = false;

        public bool Active { get { return active;  } }

        public BackgroundStreamData(bool isActive)
        {
            active = isActive;
        }

        public BackgroundStreamData(byte[] data)
        {
            active = data[0] == 1;
        }

        public byte[] ToBytes()
        {
            byte[] data = new byte[] { (byte)(active? 1 : 0) };

            return data;
        }

    }
}
